AuGR Entitiy Relationship
AuGR Entity Relationship¶
For select plugins, Entity Relationship Information is present at a connection level for a particular schema as well as a at a table level. Entity Relationship information includes data about primary key of tables and foreign key relationships between multiple tables.
This information is useful when users do not have the complete details regarding a database structure or how different tables are related in a source database. This eliminates the need to make any assumptions regarding data mapping and helps users understand the data accurately.
Entities at Connection Level¶
Entities with associated relationships can be generated at a particular Connection Level for a database schema.
-
Once connections are created, users can generate entities by clicking on ‘Generate Related Entities’.
-
Once entities are generated, users can see them by clicking on ‘View Related Entities’.
The Primary Resource refers to the primary table and the Primary Column refers to the primary key of the table. The Foreign Resource refers to the table the primary table is connected to, and the Foreign Column refers to the field or fields via which they are connected. The relationship name can be either foreign key which signifies a single column used to join the tables or multipart foreign key which signifies a combination of multiple columns to join the tables.
In the above example, we have two tables in the database - Accounts and Users. For Accounts table, either Account_Number or a combination of Account_Number and ID acts as primary key. Accounts table is connected to Users table via a combination of Account_number and ID which joins to ID and Account_owner fields in Users table, thus forming a multipart foreign key relationship. The Accounts table can also be connected to the Users tables via Account_Number field which connects to the ID field in Users table, thus forming a single foreign key relationship.
Note: Entities at connection level are ephemeral, meaning once users move to another tab or another screen from the connections screen, they would have to regenerate the related entities in order to view them.
Entities at Discover Schema Level¶
Entities with associated relationships can also be generated at individual table level for Discover Schemas.
-
On Discovering a schema, users can see the button ‘Discover Related Entities’
-
On clicking the Discover Related Entities, users can view the related entities by selecting ‘View Related Entities’.
The Primary Resource refers to the primary table and the Primary Column refers to the primary key of the table. The Foreign Resource refers to the table the primary table is connected to, and the Foreign Column refers to the field or fields via which they are connected. The relationship name can be either foreign key which signifies a single column used to join the tables or multipart foreign key which signifies a combination of multiple columns to join the tables.
In the above example, for Accounts table, either Account_Number or a combination of Account_Number and ID acts as primary key. Accounts table is connected to Users table via a combination of Account_number and ID which joins to ID and Account_owner fields in Users table, thus forming a multipart foreign key relationship. The Accounts table can also be connected to the Users tables via Account_Number field which connects to the ID field in Users table, thus forming a single foreign key relationship.
Note: Entities at discover schema level are ephemeral, meaning they persist as long as users are on the schema discover screen. If users want to regenerate the entities, they need to click on 'Discover Related Entities' button again.
Applicable Plugins¶
Plugins for which this feature is currently present are:
- DB2 (Version 1.5.0 and beyond)
- Oracle .Net (Version 1.4.0 and beyond)